QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

CONFIG += c++17


INCLUDEPATH += "$$(HALCONROOT)/include" \
               "$$(HALCONROOT)/include/hacloncpp"


win32:LIBS += "$$(HALCONROOT)/lib/$$(HALCONARCH)/halcon.lib" \ 
              "$$(HALCONROOT)/lib/$$(HALCONARCH)/halconcpp.lib"

# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    src/Algorithm/PearAlgorithm.cpp \
    src/controller/ImageDataProvider.cpp \
    src/controller/ImageMappingManager.cpp \
    src/main.cpp \
    src/models/AlgorithmData.cpp \
    src/models/ImageCoordinate.cpp \
    src/models/ProjectData.cpp \
    src/ui/MainWindow.cpp \
    src/ui/components/HalconImage/HalconWidget.cpp \
    src/ui/components/ImagaeParametersPanel.cpp \
    src/ui/components/ImageOperationPanel.cpp \
    src/ui/components/MainImagePanel.cpp \
    src/ui/components/Navigate/FovCell.cpp \
    src/ui/components/Navigate/RegionGrid.cpp \
    src/ui/components/Navigate/RegionGroup.cpp \
    src/ui/components/NavigationMapPanel.cpp \
    src/ui/components/ProjectPanel.cpp \
    src/ui/components/StatusBar.cpp

HEADERS += \
    src/Algorithm/PearAlgorithm.h \
    src/controller/ImageDataProvider.h \
    src/controller/ImageMappingManager.h \
    src/models/AlgorithmData.h \
    src/models/ImageCoordinate.h \
    src/models/ProjectData.h \
    src/ui/MainWindow.h \
    src/ui/components/HalconImage/HalconWidget.h \
    src/ui/components/ImagaeParametersPanel.h \
    src/ui/components/ImageOperationPanel.h \
    src/ui/components/MainImagePanel.h \
    src/ui/components/Navigate/FovCell.h \
    src/ui/components/Navigate/RegionGrid.h \
    src/ui/components/Navigate/RegionGroup.h \
    src/ui/components/NavigationMapPanel.h \
    src/ui/components/ProjectPanel.h \
    src/controller/SignalsBus.h \
    src/ui/components/StatusBar.h

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target


## Shadow build
CONFIG(debug, debug|release) {
    BUILD_TYPE = debug
    TARGET = $$join(TARGET,,,_debug)
} else {
    BUILD_TYPE = release
}

## Output Input
DESTDIR = $$OUT_PWD/$$BUILD_TYPE/bin
OBJECTS_DIR = $$OUT_PWD/$$BUILD_TYPE/obj
MOC_DIR = $$OUT_PWD/$$BUILD_TYPE/moc
RCC_DIR = $$OUT_PWD/$$BUILD_TYPE/rcc
UI_DIR = $$OUT_PWD/$$BUILD_TYPE/ui

!exists($$DESTDIR) {
    mkpath($$DESTDIR)
}
!exists($$OBJECTS_DIR) {
    mkpath($$OBJECTS_DIR)
}

# DEFINES += BUILD_TYPE_$$BUILD_TYPE
